package creational.prototype;

public class ShadowClone implements Cloneable{

    String name;
    public ShadowClone(String _name){
        this.name = _name;
    }

    @Override
    public ShadowClone clone(){
        ShadowClone child;
        try {
            child = (ShadowClone)super.clone();
            return child;
        }catch(Exception ex){
            ex.printStackTrace();
        }
        return null;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
